#include "rtmp.h"
#include "rtmp_sys.h"
#include "amf.h"

typedef char bool;

#define TRUE 1
#define FALSE 0

// H.264 NAL type 
typedef enum 
{ 
	H264NT_NAL = 0, 
	H264NT_SLICE, 
	H264NT_SLICE_DPA, 
	H264NT_SLICE_DPB, 
	H264NT_SLICE_DPC, 
	H264NT_SLICE_IDR, 
	H264NT_SEI, 
	H264NT_SPS, 
	H264NT_PPS, 
}H264NALTYPE; 

  
// NALU单元  
typedef struct _NaluUnit  
{  
    H264NALTYPE type;  
    int size;  
    unsigned char *data;  
}NaluUnit;  
  
typedef struct _RTMPMetadata  
{  
    // video, must be h264 type  
    unsigned int    nWidth;  
    unsigned int    nHeight;  
    unsigned int    nFrameRate;     // fps  
    unsigned int    nVideoDataRate; // bps  
    unsigned int    nSpsLen;  
    unsigned char   Sps[1024];  
    unsigned int    nPpsLen;  
    unsigned char   Pps[1024];  
  
    // audio, must be aac type  
    bool            bHasAudio;  
    unsigned int    nAudioSampleRate;  
    unsigned int    nAudioSampleSize;  
    unsigned int    nAudioChannels;  
    char            pAudioSpecCfg;  
    unsigned int    nAudioSpecCfgLen;  
  
} RTMPMetadata,*LPRTMPMetadata;  


